package com.seu.producerdemo.utils;

import com.seu.producerdemo.controller.ProducerController;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class MyApplicationRunner implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("Producer开始执行");
        ProducerController.sendPulsarMsg();
    }
}
